package com.gc.cscott.fs;

import java.io.File;

/**
 *
 * @author User
 */
public class FixOutputToOutput1 {

    public static void main(String[] args) {
        for (File dir : new File("d:/contest/tests2").listFiles()) {
            if (dir.isDirectory() && dir.getName().startsWith("tests")) {
                System.out.println("Processing: " + dir.getAbsolutePath());
                for (int i = 1; i <= 100; i++) {
                    final String input = String.format("%02d", i);
                    final File testDir = new File(dir, input);
                    if (testDir.isDirectory()){
                        final File outputFile = new File(testDir, "output.txt");
                        outputFile.renameTo(new File(testDir,"output1.txt"));
                        System.out.println("renamed: "+outputFile);
                    }
                }
            }
        }
    }
}
